<?php
/**
 * Project: AIGC
 * Author: moufer <moufer@163.com>
 * Date: 2024/7/19 01:02
 */

namespace module\user\controller\admin;

use app\library\Controller;
use mof\annotation\AdminPerm;
use mof\annotation\InjectLogic;
use mof\ApiResponse;
use mof\Logic;
use think\response\Json;

#[AdminPerm(
    title: 'VIP日志', url: 'user/vip_log', actions: '*',
    sort: 4, icon: 'GoldMedal', group: 'main'
)]
class VipLog extends Controller
{
    #[InjectLogic(\module\user\model\VipLog::class)]
    protected Logic $logic;

    public function index(): Json
    {
        return ApiResponse::success(
            $this->logic->paginate(
                $this->request->searcher()->with(['user'])
            )
        );
    }
}